package app.timer;

import java.util.TimerTask;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import app.kafka.produce.KafkaProducer;
import app.utils.SpringContextUtil;

/**
 * 系统资源监控的timer
 * 
 * @author lfy.xys
 * @date 2018年5月2日
 *
 */
public class MonitorTimer extends TimerTask {

	private static Logger logger = LoggerFactory.getLogger(MonitorTimer.class);

	@Override
	public void run() {
		logger.info("开始执行timer");
		// json化bean

		KafkaProducer sender = SpringContextUtil.getApplicationContext().getBean(KafkaProducer.class);
		sender.send("system_info_topic", "111");

	}

}
